package atlantik.ui;

import java.awt.BorderLayout;

import atlantik.game.Atlantik;

public class ConnectedState implements GUIState {

	private final GameList games;
	private final GameChooser gameChooser;
	
	public ConnectedState(Atlantik client) {
		games = new GameList(client);
		gameChooser = new GameChooser(client);
	}
	
	public void begin(GUI gui) {
		gui.add(games);
		gui.add(gameChooser, BorderLayout.EAST);
	}

	public void end(GUI gui) {
		gui.remove(games);
		gui.remove(gameChooser);
	}

}
